import 'package:flutter/material.dart';

class TestButtonScreen extends StatelessWidget {
  const TestButtonScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('按钮测试'),
        backgroundColor: Colors.pink.shade400,
        foregroundColor: Colors.white,
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text(
              '测试按钮功能',
              style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
            ),
            const SizedBox(height: 40),
            
            // 测试按钮1
            ElevatedButton(
              onPressed: () {
                print('=== 测试按钮1被点击 ===');
                ScaffoldMessenger.of(context).showSnackBar(
                  const SnackBar(
                    content: Text('🎉 测试按钮1点击成功！'),
                    backgroundColor: Colors.green,
                    duration: Duration(seconds: 2),
                  ),
                );
              },
              style: ElevatedButton.styleFrom(
                backgroundColor: Colors.blue,
                padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
              ),
              child: const Text(
                '测试按钮1',
                style: TextStyle(color: Colors.white, fontSize: 18),
              ),
            ),
            
            const SizedBox(height: 20),
            
            // 测试按钮2
            OutlinedButton(
              onPressed: () {
                print('=== 测试按钮2被点击 ===');
                ScaffoldMessenger.of(context).showSnackBar(
                  const SnackBar(
                    content: Text('🎉 测试按钮2点击成功！'),
                    backgroundColor: Colors.orange,
                    duration: Duration(seconds: 2),
                  ),
                );
              },
              style: OutlinedButton.styleFrom(
                padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
                side: const BorderSide(color: Colors.pink, width: 2),
              ),
              child: const Text(
                '测试按钮2',
                style: TextStyle(color: Colors.pink, fontSize: 18),
              ),
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          print('=== 浮动按钮被点击 ===');
          ScaffoldMessenger.of(context).showSnackBar(
            const SnackBar(
              content: Text('🎉 浮动按钮点击成功！'),
              backgroundColor: Colors.purple,
              duration: Duration(seconds: 2),
            ),
          );
        },
        backgroundColor: Colors.pink.shade400,
        child: const Icon(Icons.add, color: Colors.white),
      ),
    );
  }
}